package org.ehe.finance.voucher.domain;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.ehe.common.mybatis.core.domain.BaseEntity2;

import java.io.Serializable;
import java.time.LocalDateTime;
/**
 * @author :zhangnn
 * @className :ErpFinanceVoucherType
 * @description: TODO
 * @date 2025-08-22 17:41:01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("erp_finance_voucher_type")
public class ErpFinanceVoucherType extends BaseEntity2 {
    @Schema(description = "凭证类别ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @NotBlank(message = "凭证类别编码不能为空")
    @Size(max = 10, message = "凭证类别编码长度不能超过10个字符")
    @Pattern(regexp = "^[A-Za-z0-9]+$", message = "凭证类别编码只能包含字母和数字")
    private String typeCode;

    @NotBlank(message = "凭证类别名称不能为空")
    @Size(max = 50, message = "凭证类别名称长度不能超过50个字符")
    private String typeName;

    @NotBlank(message = "凭证字不能为空")
    @Size(max = 10, message = "凭证字长度不能超过10个字符")
    private String prefix;

    @Min(value = 3, message = "凭证号长度不能小于3")
    @Max(value = 10, message = "凭证号长度不能大于10")
    private Integer numberLength;

    @NotNull(message = "状态不能为空")
    private Integer status;

    @Size(max = 500, message = "备注长度不能超过500个字符")
    private String remark;

    private Long createDept;


}
